<!--  -->
<template>
  <div>自定义hook函数
  
    <div>账号 <input v-model="user.username" type="text"></div>
    <div>密码 <input  v-model="user.password" type="text"></div>
    <div>
        <button @click="login">登录</button>
    </div>
  </div>
</template>

<script lang='ts' setup>
import { reactive,toRefs,ref,onMounted} from 'vue'
import { useLogin } from '../../hooks/useLogin';
const {login,user}= useLogin();
</script>
<style scoped>
</style>